package org.springside.examples.miniweb.entity.report;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.format.annotation.DateTimeFormat;
import org.springside.examples.miniweb.entity.account.User;

/**
 * 压缩机报表.
 * 
 * 注释见{@link User}.
 * 
 * @author calvin
 */
@Entity
@Table(name = "coldpumpreport")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ColdPumpReport extends AssignedReport {

	/**
	 */
	private static final long serialVersionUID = 5265709161477066138L;

	private String keycomment;

	private String SN;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date inputRepository;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date coldDismantle;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date emptyDismantle;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date coldClean;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date emptyClean;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date coldAssemble;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date pistonAssemble;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date emptyAssemble;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date downTempTest;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date gasTest;
	

	/**
	 * @return the coldDismantle
	 */
	public Date getColdDismantle() {
		return coldDismantle;
	}

	/**
	 * @param coldDismantle the coldDismantle to set
	 */
	public void setColdDismantle(Date coldDismantle) {
		this.coldDismantle = coldDismantle;
	}

	/**
	 * @return the emptyDismantle
	 */
	public Date getEmptyDismantle() {
		return emptyDismantle;
	}

	/**
	 * @param emptyDismantle the emptyDismantle to set
	 */
	public void setEmptyDismantle(Date emptyDismantle) {
		this.emptyDismantle = emptyDismantle;
	}

	/**
	 * @return the coldClean
	 */
	public Date getColdClean() {
		return coldClean;
	}

	/**
	 * @param coldClean the coldClean to set
	 */
	public void setColdClean(Date coldClean) {
		this.coldClean = coldClean;
	}

	/**
	 * @return the emptyClean
	 */
	public Date getEmptyClean() {
		return emptyClean;
	}

	/**
	 * @param emptyClean the emptyClean to set
	 */
	public void setEmptyClean(Date emptyClean) {
		this.emptyClean = emptyClean;
	}

	/**
	 * @return the coldAssemble
	 */
	public Date getColdAssemble() {
		return coldAssemble;
	}

	/**
	 * @param coldAssemble the coldAssemble to set
	 */
	public void setColdAssemble(Date coldAssemble) {
		this.coldAssemble = coldAssemble;
	}

	/**
	 * @return the pistonAssemble
	 */
	public Date getPistonAssemble() {
		return pistonAssemble;
	}

	/**
	 * @param pistonAssemble the pistonAssemble to set
	 */
	public void setPistonAssemble(Date pistonAssemble) {
		this.pistonAssemble = pistonAssemble;
	}

	/**
	 * @return the emptyAssemble
	 */
	public Date getEmptyAssemble() {
		return emptyAssemble;
	}

	/**
	 * @param emptyAssemble the emptyAssemble to set
	 */
	public void setEmptyAssemble(Date emptyAssemble) {
		this.emptyAssemble = emptyAssemble;
	}

	/**
	 * @return the downTempTest
	 */
	public Date getDownTempTest() {
		return downTempTest;
	}

	/**
	 * @param downTempTest the downTempTest to set
	 */
	public void setDownTempTest(Date downTempTest) {
		this.downTempTest = downTempTest;
	}

	/**
	 * @return the gasTest
	 */
	public Date getGasTest() {
		return gasTest;
	}

	/**
	 * @param gasTest the gasTest to set
	 */
	public void setGasTest(Date gasTest) {
		this.gasTest = gasTest;
	}

	/**
	 * @return the finishPackage
	 */
	public Date getFinishPackage() {
		return finishPackage;
	}

	/**
	 * @param finishPackage the finishPackage to set
	 */
	public void setFinishPackage(Date finishPackage) {
		this.finishPackage = finishPackage;
	}

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date finishPackage;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outputRepository;

	private String comments;

	private String updatebypersion;

	

	public ColdPumpReport() {
	}

	public ColdPumpReport(Long id, String name) {
		this.id = id;
	}

	

	public String getComments() {
		return comments;
	}


	/**
	 * @return the inputrepository
	 */
	public Date getInputRepository() {
		return inputRepository;
	}

	/**
	 * @return the keycomment
	 */
	public String getKeyComment() {
		return keycomment;
	}


	/**
	 * @return the outputrepository
	 */
	public Date getOutputRepository() {
		return outputRepository;
	}

	/**
	 * @return the reportid
	 */
	@Transient
	public String getReportId() {
		return "COL"+id;
	}
	

	

	public String getSN() {
		return SN;
	}


	public String getUpdateByPersion() {
		return updatebypersion;
	}


	/**
	 * @param comments
	 *            the comments to set
	 */
	public void setComments(String comments) {
		this.comments = comments;
	}


	/**
	 * @param inputrepository
	 *            the inputrepository to set
	 */
	public void setInputRepository(Date inputrepository) {
		this.inputRepository = inputrepository;
	}

	/**
	 * @param keycomment
	 *            the keycomment to set
	 */
	public void setKeyComment(String keycomment) {
		this.keycomment = keycomment;
	}

	/**
	 * @param outputrepository
	 *            the outputrepository to set
	 */
	public void setOutputRepository(Date outputrepository) {
		this.outputRepository = outputrepository;
	}


	/**
	 * /**
	 * 
	 * @param sN
	 *            the sN to set
	 */
	public void setSN(String sN) {
		SN = sN;
	}

	/**
	 * @param updateByPersion
	 *            the updateByPersion to set
	 */
	public void setUpdateByPersion(String updateByPersion) {
		this.updatebypersion = updateByPersion;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	/*
	 * @Override public String getIdenti() { return "COM"; }
	 */
}
